package com.freesky.biz.activity.mapper;

import com.freesky.biz.activity.domain.TRpaTask;
import com.freesky.biz.activity.domain.TSmsCode;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RpaTaskMapper {


    List<TRpaTask> selectRpaTaskList(@Param("mchId") String mchId,
                                     @Param("leftCount") Integer leftCount,@Param("intervalTime") String intervalTime);

    Integer selectCountProcessed(@Param("mchId") String mchId,
                                 @Param("intervalTime") String intervalTime);

    Integer selectUnProcessedCount(@Param("mchId") String mchId);

    int updateRpaTaskProcessed(@Param("stockId") String stockId);

    int updateRpaTaskFinished(@Param("stockId") String stockId,
                              @Param("fileName") String fileName,
                              @Param("startTime") String startTime);

    //取前一天的时间
    List<TRpaTask> selectGeneralTaskList(@Param("endTime") String endTime);

    int addTaskList(@Param("taskLists") List<TRpaTask> taskLists);

    //停止任务
    int addStoppedTask(@Param("endTime") String endTime);

    List<TRpaTask> selectStoppedTaskList(@Param("mchId") String mchId);

    int updateStoppedTaskStatus(@Param("id") String id,
                              @Param("fileName") String fileName);
}
